import com.dmotiko.mirador.*
import com.dmotiko.general.*
import com.dmotiko.util.*;

class MiradorRoomsLoader
extends DataXMLLoader {

	private function parserFunction(){
		var nodes:Array = xml.firstChild.childNodes;
		var rooms:Object = XMLUtils.node2object( xml.firstChild );
		this.data = new Object();
		for (var i:Number = 0; i < rooms.room.length; i++) {
			for (var i2:Number = 0; i2 < rooms.room[i].photos.length; i2++) {
				rooms.room[i][ rooms.room[i].photos[i2].title ] = rooms.room[i].photos[i2];
			}
			this.data[ rooms.room[i].name ] = rooms.room[i];	
		}
		loadEnd();
		return;
	}

}